Optimal. Leaf size=58 \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b (c x)^{m+2}}{c^2 (m+2)}+\frac{b^2 (c x)^{m+3}}{c^3 (m+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0230505, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077, Rules used = {43} \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b (c x)^{m+2}}{c^2 (m+2)}+\frac{b^2 (c x)^{m+3}}{c^3 (m+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rubi steps
\begin{align*} \int (c x)^m (a+b x)^2 \, dx &=\int \left (a^2 (c x)^m+\frac{2 a b (c x)^{1+m}}{c}+\frac{b^2 (c x)^{2+m}}{c^2}\right ) \, dx\\ &=\frac{a^2 (c x)^{1+m}}{c (1+m)}+\frac{2 a b (c x)^{2+m}}{c^2 (2+m)}+\frac{b^2 (c x)^{3+m}}{c^3 (3+m)}\\ \end{align*}
Mathematica [A] time = 0.0280721, size = 39, normalized size = 0.67 \[ x (c x)^m \left (\frac{a^2}{m+1}+\frac{2 a b x}{m+2}+\frac{b^2 x^2}{m+3}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 88, normalized size = 1.5 \begin{align*}{\frac{ \left ({b}^{2}{m}^{2}{x}^{2}+2\,ab{m}^{2}x+3\,{b}^{2}m{x}^{2}+{a}^{2}{m}^{2}+8\,abmx+2\,{b}^{2}{x}^{2}+5\,m{a}^{2}+6\,xab+6\,{a}^{2} \right ) x \left ( cx \right ) ^{m}}{ \left ( 3+m \right ) \left ( 2+m \right ) \left ( 1+m \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.33879, size = 184, normalized size = 3.17 \begin{align*} \frac{{\left ({\left (b^{2} m^{2} + 3 \, b^{2} m + 2 \, b^{2}\right )} x^{3} + 2 \,{\left (a b m^{2} + 4 \, a b m + 3 \, a b\right )} x^{2} +{\left (a^{2} m^{2} + 5 \, a^{2} m + 6 \, a^{2}\right )} x\right )} \left (c x\right )^{m}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.476777, size = 338, normalized size = 5.83 \begin{align*} \begin{cases} \frac{- \frac{a^{2}}{2 x^{2}} - \frac{2 a b}{x} + b^{2} \log{\left (x \right )}}{c^{3}} & \text{for}\: m = -3 \\\frac{- \frac{a^{2}}{x} + 2 a b \log{\left (x \right )} + b^{2} x}{c^{2}} & \text{for}\: m = -2 \\\frac{a^{2} \log{\left (x \right )} + 2 a b x + \frac{b^{2} x^{2}}{2}}{c} & \text{for}\: m = -1 \\\frac{a^{2} c^{m} m^{2} x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{5 a^{2} c^{m} m x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{6 a^{2} c^{m} x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{2 a b c^{m} m^{2} x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{8 a b c^{m} m x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{6 a b c^{m} x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{b^{2} c^{m} m^{2} x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{3 b^{2} c^{m} m x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac{2 b^{2} c^{m} x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.14637, size = 182, normalized size = 3.14 \begin{align*} \frac{\left (c x\right )^{m} b^{2} m^{2} x^{3} + 2 \, \left (c x\right )^{m} a b m^{2} x^{2} + 3 \, \left (c x\right )^{m} b^{2} m x^{3} + \left (c x\right )^{m} a^{2} m^{2} x + 8 \, \left (c x\right )^{m} a b m x^{2} + 2 \, \left (c x\right )^{m} b^{2} x^{3} + 5 \, \left (c x\right )^{m} a^{2} m x + 6 \, \left (c x\right )^{m} a b x^{2} + 6 \, \left (c x\right )^{m} a^{2} x}{m^{3} + 6 \, m^{2} + 11 \, m + 6} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]